﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 阈值表
    /// </summary>
    [Table("t_threshold")]
    public class Threshold
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [Column("id")]
        public long Id { get; set; }

        /// <summary>
        /// 分组Id
        /// </summary>
        [Column("group_id")]
        public long GroupId { get; set; }

        /// <summary>
        /// 标签名称
        /// </summary>
        [Column("name")]
        public string Name { get; set; }

        /// <summary>
        /// 阈值类型(全部，标签类型，标签)
        /// </summary>
        [Column("threshold_type")]
        public int ThresholdType { get; set; }

        /// <summary>
        /// 开始值
        /// </summary>
        [Column("start_value")]
        public double StartValue { get; set; }

        /// <summary>
        /// 结束值
        /// </summary>
        [Column("end_value")]
        public double EndValue { get; set; }

        /// <summary>
        /// 创建人Id
        /// </summary>
        [Column("create_id")]
        public long CreateId { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("update_time")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }

    }
}
